#  CMake config file for the TraX library
#
#  It defines the following variables:
#    TRAX_INCLUDE_DIRS - list of include directories
#    TRAX_LIBRARIES    - list of libraries to link against
#    TRAX_LIBRARY_DIRS - list of library directories

@PACKAGE_INIT@

# Compute paths
get_filename_component(trax_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
set(TRAX_LIBRARIES "")

IF(NOT trax_FIND_COMPONENTS)
  SET(trax_FIND_COMPONENTS core)
ENDIF()

FOREACH(COMPONENT ${trax_FIND_COMPONENTS})
IF(NOT EXISTS ${trax_CMAKE_DIR}/trax-component-${COMPONENT}.cmake)
  SET(trax_${COMPONENT}_FOUND 0)
  IF(trax_FIND_REQUIRED_${COMPONENT})
	MESSAGE(FATAL_ERROR "TraX component ${COMPONENT} not available.")
  ENDIF()
ELSE()
  INCLUDE("${trax_CMAKE_DIR}/trax-component-${COMPONENT}.cmake")
  SET(trax_${COMPONENT}_FOUND 1)
ENDIF()
ENDFOREACH()

IF (trax_core_FOUND)
LIST(APPEND TRAX_LIBRARIES "trax")
ENDIF()

IF (trax_client_FOUND)
LIST(APPEND TRAX_LIBRARIES "trax_client")
ENDIF()

IF (trax_opencv_FOUND)
LIST(APPEND TRAX_LIBRARIES "trax_opencv")
ENDIF()

SET(TRAX_INCLUDE_DIRS "@PACKAGE_INCLUDE_INSTALL_DIR@" "@PACKAGE_INCLUDE_INSTALL_DIR@/trax")
SET(TRAX_LIBRARY_DIRS "@PACKAGE_LIB_INSTALL_DIR@")

set(TRAX_FOUND TRUE)

